﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    [ObjectEvent]
    public class TrapCardSetComponentEvent : ObjectEvent<TrapCardSetComponent>, IAwake
    {
        public void Awake()
        {
            Get().Awake();
        }
    }
    public class TrapCardSetComponent : CardUseComponent, ICardUse, IIfCardUse
    {
        public override string UseInfo { get; set; } = "当做陷阱卡覆盖";

        public override bool IfUse(FightModel fightModel, BattlePlayer user)
        {
            if (fightModel.BattleStatus == BattleStatus.Set && baseCard.CardPlace == CardPlace.Hand)
                return true;
            return false;
        }

        public override void Use(FightModel fightModel, BattlePlayer user)
        {
            baseCard.CardGroup.MoveCards(baseCard.Owner[CardPlace.Equip], new List<BattleCard>() { baseCard });
            baseCard.IfRightSide = false;
        }
    }
}
